From b15050fc082c59b1ce13dd7244477ee3eb55f28d Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk[cl349]" Date: Tue, 10 May 2005 14:49:06 +0000 Subject: [PATCH] bitkeeper revision 1.1389.16.1 (4280c9e2jOlPDS_OBC6Lw_D6kD2DsA) smpboot.c: Fix apic setup for SMP guest kernel running on non-SMP machine. Plus minor cleanups. smpboot_hooks.h: smpboot_clear_io_apic_irqs now makes sense. smpboot.c: start_secondary doesn't return anything. Signed-off-by: Christian Limpach --- .../arch/xen/i386/kernel/smpboot.c | 17 +++-------------- .../asm-xen/asm-i386/mach-xen/smpboot_hooks.h | 4 ---- .../asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h | 4 ---- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c index 3e9f82f1d9..7c1ef78cd9 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c @@ -54,6 +54,7 @@ #include #include +#include #include #include @@ -493,19 +494,7 @@ static void __init start_secondary(void *unused) local_irq_enable(); wmb(); - if (0) { - char *msg2 = "delay2\n"; - int timeout; - for (timeout = 0; timeout < 50000; timeout++) { - udelay(1000); - if (timeout == 2000) { - (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg2), msg2); - timeout = 0; - } - } - } cpu_idle(); - return 0; } /* @@ -1111,15 +1100,15 @@ static void __init smp_boot_cpus(unsigned int max_cpus) * If we couldn't find an SMP configuration at boot time, * get out of here now! */ - if (!smp_found_config /* && !acpi_lapic) */) { + if (!smp_found_config && !acpi_lapic) { printk(KERN_NOTICE "SMP motherboard not detected.\n"); smpboot_clear_io_apic_irqs(); #if 0 phys_cpu_present_map = physid_mask_of_physid(0); +#endif if (APIC_init_uniprocessor()) printk(KERN_NOTICE "Local APIC not detected." " Using dummy APIC emulation.\n"); -#endif map_cpu_to_logical_apicid(); return; } diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h index 7479f82686..c2c211e5ea 100644 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h @@ -3,11 +3,7 @@ static inline void smpboot_clear_io_apic_irqs(void) { -#if 1 - printk("smpboot_clear_io_apic_irqs\n"); -#else io_apic_irqs = 0; -#endif } static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h index 7479f82686..c2c211e5ea 100644 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h @@ -3,11 +3,7 @@ static inline void smpboot_clear_io_apic_irqs(void) { -#if 1 - printk("smpboot_clear_io_apic_irqs\n"); -#else io_apic_irqs = 0; -#endif } static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) -- 2.30.2